<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@include file="/common.jsp" %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户登录</title>
<link href="${dwzPath }/themes/css/login.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" language="javascript">
//设为首页
function SetHome(obj,url){
    try{
        obj.style.behavior='url(#default#homepage)';
        obj.setHomePage(url);
    }catch(e){
        if(window.netscape){
            try{
                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
            }catch(e){
                alert("抱歉，此操作被浏览器拒绝！\n\n请在浏览器地址栏输入“about:config”并回车然后将[signed.applets.codebase_principal_support]设置为'true'");
            }
        }else{
            alert("抱歉，您所使用的浏览器无法完成此操作。\n\n您需要手动将【"+url+"】设置为首页。");
        }
    }
}
//收藏本站
function AddFavorite(title, url) {
    try {
        window.external.addFavorite(url, title);
    }
    catch (e) {
        try {
            window.sidebar.addPanel(title, url, "");
        }
        catch (e) {
            alert("抱歉，您所使用的浏览器无法完成此操作。\n\n加入收藏失败，请使用Ctrl+D进行添加");
        }
    }
}

// 验证码
function getCaptcha(){
	var url = document.getElementById("captchaImg").getAttribute("src");
	url = url + "?R="+ new Date().getTime();
	document.getElementById("captchaImg").setAttribute("src", url);
}
</script>
</head>
<body>
	<div id="login">
		<div id="login_header">
			<h1 class="login_logo">
				<a href="http://demo.dwzjs.com"><img src="${dwzPath }/themes/default/images/login_logo.gif" /></a>
			</h1>
			<div class="login_headerContent">
				<div class="navList">
					<ul>
						<li><a href="javascript:void(0);" onclick="SetHome(this,'http://localhost:28080/ezcms');">设为首页</a></li>
						<li><a href="javascript:void(0);" onclick="AddFavorite('后台管理平台',location.href)">收藏</a></li>
						<li><a href="http://bbs.dwzjs.com">反馈</a></li>
						<li><a href="${dwzPath }/doc/dwz-user-guide.pdf" target="_blank">帮助</a></li>
					</ul>
				</div>
				<h2 class="login_title"><img src="${dwzPath }/themes/default/images/login_title.png" /></h2>
			</div>
		</div>
		<div id="login_content">
			<div class="loginForm">
				<div style="color: red; padding-left: 80px; padding-bottom: 10px;">${message}</div>
				<form action="${ctxPath }/login">
					<p>
						<label>用户名：</label>
						<input type="text" name="username" size="20" class="login_input" value="xiaojl"/>
					</p>
					<p>
						<label>密码：</label>
						<input type="password" name="password" size="20" class="login_input" value="1"/>
					</p>
					<c:if test="${captchaOpen }">
						<p>
							<label>验证码：</label>
							<input class="code" type="text" size="4" name="captcha" />
							<span><img id="captchaImg" alt="验证码" src="${ctxPath }/captcha.jpg" onclick="getCaptcha()" width="75" height="24" /></span>
						</p>
					</c:if>
					<div class="login_bar">
						<input class="sub" type="submit" value=" " />
					</div>
				</form>
			</div>
			<div class="login_banner"><img src="${dwzPath }/themes/default/images/login_banner.jpg" /></div>
			<div class="login_main">
				<ul class="helpList">
<!-- 					<li><a href="#">下载驱动程序</a></li> -->
					<li><a href="#">还没有账户？</a></li>
					<li><a href="#">忘记密码怎么办？</a></li>
					<li><a href="#">为什么登录失败？</a></li>
				</ul>
				<div class="login_inner">
					<p>您可以使用 网易网盘 ，随时存，随地取</p>
					<p>您还可以使用 闪电邮 在桌面随时提醒邮件到达，快速收发邮件。</p>
					<p>在 百宝箱 里您可以查星座，订机票，看小说，学做菜…</p>
				</div>
			</div>
		</div>
		<div id="login_footer">
			Copyright &copy; 2017 easy4touch@yeah.net Inc. All Rights Reserved.
		</div>
	</div>
</body>
</html>